Optimal. Leaf size=387 \[ \frac {2 g^2 \sqrt {a+c x^2}}{(e f-d g) \left (c f^2+a g^2\right ) \sqrt {f+g x}}+\frac {2 \sqrt {-a} \sqrt {c} g \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{(e f-d g) \left (c f^2+a g^2\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}-\frac {2 e \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} \Pi \left (\frac {2 e}{\frac {\sqrt {c} d}{\sqrt {-a}}+e};\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|\frac {2 \sqrt {-a} g}{\sqrt {c} f+\sqrt {-a} g}\right )}{\left (\frac {\sqrt {c} d}{\sqrt {-a}}+e\right ) (e f-d g) \sqrt {f+g x} \sqrt {a+c x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.40, antiderivative size = 387, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.321, Rules used = {972, 759, 21,
733, 435, 947, 174, 552, 551} \begin {gather*} \frac {2 \sqrt {-a} \sqrt {c} g \sqrt {\frac {c x^2}{a}+1} \sqrt {f+g x} E\left (\text {ArcSin}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{\sqrt {a+c x^2} \left (a g^2+c f^2\right ) (e f-d g) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}}}-\frac {2 e \sqrt {\frac {c x^2}{a}+1} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}} \Pi \left (\frac {2 e}{\frac {\sqrt {c} d}{\sqrt {-a}}+e};\text {ArcSin}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|\frac {2 \sqrt {-a} g}{\sqrt {c} f+\sqrt {-a} g}\right )}{\sqrt {a+c x^2} \sqrt {f+g x} \left (\frac {\sqrt {c} d}{\sqrt {-a}}+e\right ) (e f-d g)}+\frac {2 g^2 \sqrt {a+c x^2}}{\sqrt {f+g x} \left (a g^2+c f^2\right ) (e f-d g)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 174
Rule 435
Rule 551
Rule 552
Rule 733
Rule 759
Rule 947
Rule 972
Rubi steps
\begin {align*} \int \frac {1}{(d+e x) (f+g x)^{3/2} \sqrt {a+c x^2}} \, dx &=\int \left (-\frac {g}{(e f-d g) (f+g x)^{3/2} \sqrt {a+c x^2}}+\frac {e}{(e f-d g) (d+e x) \sqrt {f+g x} \sqrt {a+c x^2}}\right ) \, dx\\ &=\frac {e \int \frac {1}{(d+e x) \sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{e f-d g}-\frac {g \int \frac {1}{(f+g x)^{3/2} \sqrt {a+c x^2}} \, dx}{e f-d g}\\ &=\frac {2 g^2 \sqrt {a+c x^2}}{(e f-d g) \left (c f^2+a g^2\right ) \sqrt {f+g x}}+\frac {(2 c g) \int \frac {-\frac {f}{2}-\frac {g x}{2}}{\sqrt {f+g x} \sqrt {a+c x^2}} \, dx}{(e f-d g) \left (c f^2+a g^2\right )}+\frac {\left (e \sqrt {1+\frac {c x^2}{a}}\right ) \int \frac {1}{\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}} \sqrt {1+\frac {\sqrt {c} x}{\sqrt {-a}}} (d+e x) \sqrt {f+g x}} \, dx}{(e f-d g) \sqrt {a+c x^2}}\\ &=\frac {2 g^2 \sqrt {a+c x^2}}{(e f-d g) \left (c f^2+a g^2\right ) \sqrt {f+g x}}-\frac {(c g) \int \frac {\sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx}{(e f-d g) \left (c f^2+a g^2\right )}-\frac {\left (2 e \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2-x^2} \left (\frac {\sqrt {c} d}{\sqrt {-a}}+e-e x^2\right ) \sqrt {f+\frac {\sqrt {-a} g}{\sqrt {c}}-\frac {\sqrt {-a} g x^2}{\sqrt {c}}}} \, dx,x,\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}\right )}{(e f-d g) \sqrt {a+c x^2}}\\ &=\frac {2 g^2 \sqrt {a+c x^2}}{(e f-d g) \left (c f^2+a g^2\right ) \sqrt {f+g x}}-\frac {\left (2 e \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2-x^2} \left (\frac {\sqrt {c} d}{\sqrt {-a}}+e-e x^2\right ) \sqrt {1-\frac {\sqrt {-a} g x^2}{\sqrt {c} \left (f+\frac {\sqrt {-a} g}{\sqrt {c}}\right )}}} \, dx,x,\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}\right )}{(e f-d g) \sqrt {f+g x} \sqrt {a+c x^2}}-\frac {\left (2 a \sqrt {c} g \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {\sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}}{\sqrt {1-x^2}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{\sqrt {-a} (e f-d g) \left (c f^2+a g^2\right ) \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {a+c x^2}}\\ &=\frac {2 g^2 \sqrt {a+c x^2}}{(e f-d g) \left (c f^2+a g^2\right ) \sqrt {f+g x}}+\frac {2 \sqrt {-a} \sqrt {c} g \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{(e f-d g) \left (c f^2+a g^2\right ) \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}-\frac {2 e \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {1+\frac {c x^2}{a}} \Pi \left (\frac {2 e}{\frac {\sqrt {c} d}{\sqrt {-a}}+e};\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|\frac {2 \sqrt {-a} g}{\sqrt {c} f+\sqrt {-a} g}\right )}{\left (\frac {\sqrt {c} d}{\sqrt {-a}}+e\right ) (e f-d g) \sqrt {f+g x} \sqrt {a+c x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 22.15, size = 468, normalized size = 1.21 \begin {gather*} \frac {2 i \sqrt {\frac {g \left (\frac {i \sqrt {a}}{\sqrt {c}}+x\right )}{f+g x}} \sqrt {-\frac {\frac {i \sqrt {a} g}{\sqrt {c}}-g x}{f+g x}} (f+g x) \left (\sqrt {c} (e f-d g) E\left (i \sinh ^{-1}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )+\left (i \sqrt {a} e g+\sqrt {c} (-2 e f+d g)\right ) F\left (i \sinh ^{-1}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )+e \left (\sqrt {c} f-i \sqrt {a} g\right ) \Pi \left (\frac {\sqrt {c} (e f-d g)}{e \left (\sqrt {c} f+i \sqrt {a} g\right )};i \sinh ^{-1}\left (\frac {\sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}}}{\sqrt {f+g x}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )\right )}{\left (\sqrt {c} f-i \sqrt {a} g\right ) \sqrt {-f-\frac {i \sqrt {a} g}{\sqrt {c}}} (e f-d g)^2 \sqrt {a+c x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(2010\) vs.
\(2(324)=648\).
time = 0.13, size = 2011, normalized size = 5.20
method | result | size |
elliptic | \(\frac {\sqrt {\left (g x +f \right ) \left (c \,x^{2}+a \right )}\, \left (-\frac {2 \left (c g \,x^{2}+a g \right ) g}{\left (a \,g^{2}+c \,f^{2}\right ) \left (d g -e f \right ) \sqrt {\left (x +\frac {f}{g}\right ) \left (c g \,x^{2}+a g \right )}}+\frac {2 g f c \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{\left (d g -e f \right ) \left (a \,g^{2}+c \,f^{2}\right ) \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}+\frac {2 g^{2} c \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \left (\left (-\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \EllipticE \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )+\frac {\sqrt {-a c}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{c}\right )}{\left (d g -e f \right ) \left (a \,g^{2}+c \,f^{2}\right ) \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}-\frac {2 \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \EllipticPi \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {d}{e}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{\left (d g -e f \right ) \sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}\, \left (-\frac {f}{g}+\frac {d}{e}\right )}\right )}{\sqrt {g x +f}\, \sqrt {c \,x^{2}+a}}\) | \(929\) |
default | \(\text {Expression too large to display}\) | \(2011\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {a + c x^{2}} \left (d + e x\right ) \left (f + g x\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {1}{{\left (f+g\,x\right )}^{3/2}\,\sqrt {c\,x^2+a}\,\left (d+e\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________